package com.cyc.service.impl;

import com.cyc.dao.AddressMapper;
import com.cyc.entity.Address;
import com.cyc.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    AddressMapper addressMapper;

    @Override
    public int deleteByUserId(Integer id) {
        return addressMapper.deleteByUserId(id);
    }

    @Override
    public int updateByUserId(Map<String, Object> map) {
        return addressMapper.updateByUserId(map);
    }

    @Override
    public int insertByuserId(Map<String, Object> map) {
        return addressMapper.insertByuserId(map);
    }

    @Override
    public List<Address> selectAll() {
        return addressMapper.selectAll();
    }

    @Override
    public List<Address> selectAllByUserId(Integer id) {
        return addressMapper.selectAllByUserId(id);
    }
}
